<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<script type="text/javascript">



    function getTitle(divId, url) {
        loadDiv(divId, url);
    }


</script>
<form id="addForm">

</form>
<div class="panel-body">
    <section class="main-content col-lg-12" id="LeftDiv">
        <div class="table-responsive no-border">
            <div class="datatable-top">
                <div class="pull-left">
                    <form:form id="searchForm" class="form-inline">
                        <input class="btn btn-new"
                               onclick="addTreat('${visitId}','${clinicId}','${patientId}','${prescApplyId}','${inoroutFlag}')"
                               type="button" value="插入"
                               id="addClinic"/>
                        主题：<input id="title" name="title" type="text" class="form-control"/>
                        <%--适用范围：<select name="flag" id="flag" class="form-control">--%>
                        <%--<option value="" label="请选择持模板适用范围">请选择持模板适用范围</option>--%>
                        <%--<option value="0" label="全部">全部</option>--%>
                        <%--<option value="1" label="本人">本人</option>--%>
                        <%--<option value="2" label="科室">科室</option>--%>
                        <%--</select>--%>
                        <input id="btnSubmit"
                               onclick="getTitle('contentDiv',ctx+'/doctor/outpTreatRec/indexTreat?type=2&creator=${creator}&deptCode=${deptCode}&clinicId=${clinicId}&patientId=${patientId}&prescApplyId=${prescApplyId}&title='+$('#title').val())"
                               class="btn btn-primary" type="button" value="查询"/>
                    </form:form>

                </div>
            </div>
            <table id="applyPrescTable" class="table table-bordered mg-t datatable">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>主题</th>
                    <th>子标题</th>
                    <th>范围</th>
                    <th>科室</th>
                    <th>类型</th>
                    <th style="display:none">药房</th>
                    <th>项目类别</th>
                    <th>诊断描述</th>
                    <th>建议</th>
                    <th>创建人</th>
                    <th style="display:none">id</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${pageApply}" var="doctorTempla" varStatus="count">
                <tr onclick="addSubProjectDivN(this,'treatProjectItem','${ctx}/doctor/outpTreatRec/indexTreatSub?type=2&id=${doctorTempla.id}&kc=1&itemClass=${doctorTempla.itemClass}','${doctorTempla.itemClass}','${doctorTempla.id}')">
                    <td><input type="hidden" value="${doctorTempla.id}"> ${count.index+1}</td>
                    <td> ${doctorTempla.title}</td>
                    <td> ${doctorTempla.subTitle}</td>
                    <td> ${fns:getDictLabels(doctorTempla.flag, 'TEMPLA_FLAG', '')}</td>
                    <td> ${fns:getDeptName(doctorTempla.deptCode,'')}</td>
                    <td> ${fns:getDictLabels(doctorTempla.projectType,'TEMPLA_GENRE','')}</td>
                    <td style="display:none"> ${doctorTempla.implementDept} </td>
                    <td><input type="hidden" value="${doctorTempla.itemClass}"> <c:if
                            test="${doctorTempla.itemClass eq 'A'}">
                        西药
                    </c:if>
                        <c:if test="${doctorTempla.itemClass eq 'B'}">
                            中药
                        </c:if>
                    </td>
                    <td> ${doctorTempla.advice}</td>
                    <td> ${doctorTempla.diagnosis}</td>
                    <td> ${doctorTempla.name}</td>
                    <td style="display:none">${doctorTempla.id}</td>
                </tr>
                </c:forEach>

            </table>
            <div class="pagination">${page}</div>
        </div>
    </section>

    <section class="main-content col-lg-4" style="display: none" id="RightDiv">
        <div class="content-wrap" id="rigthCenterDiv">
        </div>
    </section>
</div>

